package org.gry.dy20180724;

public class DuoTai {
	public static void main(String[] args) {
		 Base base= new Child();
	        base.method();
		/*Fu a = new Fu();
		Zi1 b = new Zi1();
		Zi2 c = new Zi2();
		diao(c);
		char i =2+'2';

		System.out.println(i);*/
	}
	
	static void diao(Fu a){
		a.pao();
	}
}

class Fu{
	public void pao(){
		System.out.println("跑步。。。");
	}
}
class Zi1 extends Fu{
	@Override
	public void pao() {
		System.out.println("子1跑步");
	}
	
}
class Zi2 extends Fu{
	@Override
	public void pao() {
		System.out.println("子2跑步");
	}
}
class Base {
    public void method(){
        System.out.print ("Base method");
    }
}
class Child extends Base{   
    public void methodB(){
        System.out.print ("Child methodB");
    }
}
class Sample {
    
}